const go/types.invalidOp
40 uses
go/types (current package)
builtins.go#L31: invalidOp+"invalid use of ... with built-in %s", bin.name)
builtins.go#L81: check.errorf(argErrPos(call), WrongArgCount, invalidOp+"%s arguments for %v (expected %d, found %d)", msg, call, bin.nargs, nargs)
builtins.go#L255: check.errorf(x, InvalidClose, invalidOp+"cannot close non-channel %s", x)
builtins.go#L259: check.errorf(x, InvalidClose, invalidOp+"cannot close receive-only channel %s", x)
builtins.go#L322: check.errorf(x, InvalidComplex, invalidOp+"%v (mismatched types %s and %s)", call, x.typ, y.typ)
builtins.go#L513: check.errorf(call, WrongArgCount, invalidOp+"%v expects %d or %d arguments; found %d", call, min, min+1, nargs)
call.go#L251: check.errorf(x, InvalidCall, invalidOp+"cannot call non-function %s", x)
errors.go#L226: invalidOp = "invalid operation: "
expr.go#L76: check.errorf(x, UndefinedOp, invalidOp+"operator %s not defined on %s", op, x)
expr.go#L141: check.errorf(x, UnaddressableOperand, invalidOp+"cannot take address of %s", x)
expr.go#L152: check.errorf(x, InvalidReceive, invalidOp+"cannot receive from %s (no core type)", x)
expr.go#L158: check.errorf(x, InvalidReceive, invalidOp+"cannot receive from non-channel %s", x)
expr.go#L163: check.errorf(x, InvalidReceive, invalidOp+"cannot receive from send-only channel %s", x)
expr.go#L323: check.errorf(x, InvalidShiftOperand, invalidOp+"shifted operand %s (type %s) must be integer", x, typ)
expr.go#L570: check.errorf(errOp, code, invalidOp+"%s %s %s (%s)", x.expr, op, y.expr, cause)
expr.go#L604: check.errorf(x, InvalidShiftOperand, invalidOp+"shifted operand %s must be integer", x)
expr.go#L619: check.errorf(y, InvalidShiftCount, invalidOp+"negative shift count %s", y)
expr.go#L637: if !allUnsigned(y.typ) && !check.verifyVersionf(y, go1_13, invalidOp+"signed shift count %s", y) {
expr.go#L650: check.errorf(y, InvalidShiftCount, invalidOp+"shift count %s must be integer", y)
expr.go#L671: check.errorf(y, InvalidShiftCount, invalidOp+"invalid shift count %s", y)
expr.go#L722: check.errorf(x, InvalidShiftOperand, invalidOp+"shifted operand %s must be integer", x)
expr.go#L792: check.errorf(posn, MismatchedTypes, invalidOp+"%s (mismatched types %s and %s)", e, x.typ, y.typ)
expr.go#L794: check.errorf(posn, MismatchedTypes, invalidOp+"%s %s= %s (mismatched types %s and %s)", lhs, op, rhs, x.typ, y.typ)
expr.go#L809: check.error(&y, DivByZero, invalidOp+"division by zero")
expr.go#L819: check.error(&y, DivByZero, invalidOp+"division by zero")
expr.go#L1072: check.errorf(x, InvalidAssert, invalidOp+"cannot use type assertion on type parameter value %s", x)
expr.go#L1076: check.errorf(x, InvalidAssert, invalidOp+"%s is not an interface", x)
expr.go#L1103: check.errorf(x, InvalidIndirection, invalidOp+"cannot indirect %s", x)
expr.go#L1107: check.errorf(x, InvalidIndirection, invalidOp+"pointers of %s must have identical base types", x)
index.go#L188: check.errorf(x, NonIndexableOperand, invalidOp+"cannot index %s", x)
index.go#L222: check.errorf(x, NonSliceableOperand, invalidOp+"cannot slice %s: %s has no core type", x, x.typ)
index.go#L233: check.error(at, InvalidSliceExpr, invalidOp+"3-index slice of string")
index.go#L252: check.errorf(x, NonSliceableOperand, invalidOp+"cannot slice %s (value not addressable)", x)
index.go#L271: check.errorf(x, NonSliceableOperand, invalidOp+"cannot slice %s", x)
index.go#L340: check.error(expr.indices[1], InvalidIndex, invalidOp+"more than one index")
stmt.go#L471: check.errorf(inNode(s, s.Arrow), InvalidSend, invalidOp+"cannot send to %s: no core type", &ch)
stmt.go#L476: check.errorf(inNode(s, s.Arrow), InvalidSend, invalidOp+"cannot send to non-channel %s", &ch)
stmt.go#L480: check.errorf(inNode(s, s.Arrow), InvalidSend, invalidOp+"cannot send to receive-only channel %s", &ch)
stmt.go#L503: check.errorf(s.X, NonNumericIncDec, invalidOp+"%s%s (non-numeric type %s)", s.X, s.Tok, x.typ)
typexpr.go#L451: check.errorf(ix.orig, NotAGenericType, invalidOp+"%s (%s)", ix.orig, cause)